mgmedia2

Installation | Configuration | Quick usage | Templates | Changelog | License | Credits | Contact & Support

mgmedia2 displays various multimedia files in your content, it consist of 2 install packages for Joomla!. First the com_mgmedia2 component and second the bot_mgmedia2 plugin.
The component installs the playerscache table into database and offers the posibility to clean cache, so you must install that component and the bot, otherwise the bot would throw errors.

Installation:

  1. Install com_mgmedia2
  2. Install bot_mgmedia2
  3. Publish mgmediabot2
  4. Configure

Configuration: (up)

  1. Popup Autoplay, enable this if all mediafiles in popups/lightbox should play automatically
  2. Content Autoplay, enable this if all mediafiles in content should play automatically
  3. Debug, enable this to show some debug information (very ugly)

Quick usage: (up)

  1. Upload your media with your media-manager, or if to big with your favorite FTP client, for example to images/stories/video/videodatei.wmv
  2. Add in your content the following:
  3. Playlists: for using multiple files (mp3,flv,rtmp,jpg,png,gif,swf or rbs) you can enter them like this: path=file1.mp3|path=file2.mp3|....
    You will find more examples and specific examples for the included templates in the template folder
  4. Don't use "," in your mgmediabot line.
  5. NEW! mgmediabotlines are now allowed to be multiple lines (divided by <br />, <p> or </p>, instead of "|")
    {mgmediabot2}
    path=images/stories/video/videodatei.wmv
    popup=Click here to play
    width=300
    height=300
    {/mgmediabot2}

    Be careful, those multiline mgmediabot params have much error potential
  6. Before requesting support, ensure that there are no other html tags inside mgmediabot line as <br />, <p> and </p>
  7. See template documentation for default templates.
 

Templates: (up)

1. Template structure

The default templates are installed at components/com_mgmedia2/templates/, if you like to customize them, or create a new one, please create an new folder mgmediabot in your Joomla template folder e.g. templates/YourTemplateFolder/mgmediabot. To start simply copy the original templates into this folder.

Notice: Don't use ' (single qoutes), or if you need them, escape them with \.

A template consists of four sections

1.1. Documentation (optional)

--start documentation
<h3>My Player</h3>
<h4>Parameter:</h4>
<ul>
   <li>type (optional|mandatory, [filetype1|filetype2])</li>
   <li>myparam (optional, default=345)</li>
...
   <li><a href="#moreprams">more paramters</a></li>
</ul>

<h4>Usage</h4>
<pre>
{mgmediabot2}..sampleline...{/mgmediabot}
</pre>
--end documentation

1.2. Types (required)

--start filetypes supported
types=<filetype1>,<filetype2>
--end filetypes supported

Her you can define all file types your player will support

1.3. Autoplay (optional)

--start autoplay values
autoplay=true,false
--end autoplay values

This section is only needed if your player needs other parameters as 1 or 0 for knowing if it should play automatically or not.
Most flashplayers need this because they don't accept 1/0 as autostart parameter

1.4. jsconfig (optional)

--start jsconfig
disablejavascript=true
--end jsconfig

This section is only needed if your player is embedded with Javascript and not using object or embed tags, for example the Flash Mediaplayer.

1.5. Template (required)

--start template
<your template div here, see 2.>
--end template

2. Template

While mgmedia2 is mainly written to embed media files into Joomla, this new template system makes it easy to implement viewer for every file you like, if there is a 'player' for it.

2.1. A very simple template

--start filetypes supported
types=gif,jpg,png
--end filetypes supported

--start template
<img src="<{path}>" title="<{title}>" alt="<{title}>" />
--end template

Now you can use the mgmediabot2 line:

{mgmediabot2}path=images/myimage.jpg|title=My Picture{/mgmediabot2}

Output would be:

<img src="images/myimage.jpg" title="My Picture" alt="My Picture" />

2.2. A more complex template

--start filetypes supported
types=gif,jpg,png
--end filetypes supported

--start template
<img src="<{path}>" title="<{title default=My title}>" alt="<{title default=My title}>" />
--end template

Now you can use the mgmediabot2 line as before:

{mgmediabot2}path=images/myimage.jpg|title=My Picture{/mgmediabot2}

Output would be as before:

<img src="images/myimage.jpg" title="My Picture" alt="My Picture" />

But now title could be left out, and the default value will be set:

{mgmediabot2}path=images/myimage.jpg{/mgmediabot2}

Output would be:

<img src="images/myimage.jpg" title="My title" alt="My title" />

2.3. Define your own replacement parameters

With this release of mgmedia2 it is possible to define your parameters as you like and as you need.

Look at the next example:

--start filetypes supported
types=gif,jpg,png
--end filetypes supported

--start template
<img src="<{path}>" title="<{title default=My title}>" alt="<{title default=My title}>" style="<{myfancystyle}>" />
--end template

{mgmediabot2}path=images/myimage.jpg|myfancystyle=border:1px solid black;{/mgmediabot2}

2.4. Default replacements

<{mosConfig_live_site}>
will be replaced with your Joomla webroot
<{autoplay}>
will be replaced per default with 0 or 1, or if used with the values of the template autoplay section (see 1.2.)
<{playerid}>
will be replaced with the md5 hash of your mgmediabot2 line, this assures that the playerid on this website is only used one time, for one player

2.5 Complex example - Old Flash Mediaplayer template:

1. Using object and embed tags

--start filetypes supported
types=flv,xml,mp3,jpg,gif,png,rbs,rtmp,swf
--end filetypes supported

--start autoplay values
-- insert here the values for the autostart feature of mgmedia2
autoplay=true,false
--end autoplay values

--start template
<object id="mp3player<{playerid}>" type="application/x-shockwave-flash" data="<{mosConfig_live_site}>/components/com_mgmedia2/mediaplayer.swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" divbase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,29,0" width="<{width}>" height="<{height}>" wmode="transparent">
<param name="height" value="<{height}>" />
<param name="width" value="<{width}>" />
<param name="movie" value="<{mosConfig_live_site}>/components/com_mgmedia2/mediaplayer.swf" />
<param name="flashvars" value="file=<{mosConfig_live_site}>/index2.php%3Foption%3Dcom_mgmedia2%26no_html%3D1%26mode%3Dplaylist%26playerid%3D<{playerid}>&autostart=<{autoplay}>&displayheight=200" />
<param name="wmode" value="transparent" />
<embed flashvars="file=<{mosConfig_live_site}>/index2.php%3Foption%3Dcom_mgmedia2%26no_html%3D1%26mode%3Dplaylist%26playerid%3D<{playerid}>&autostart=<{autoplay}>&displayheight=200" src="<{mosConfig_live_site}>/components/com_mgmedia2/mediaplayer.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="<{width}>" height="<{height}>" wmode="transparent"></embed>
</object>
--end template

See http://www.jeroenwijering.com/embed/readme.html how to use the flashvars.

You can change the templates to fit your needs, if you dont' use a folder "mgmediabot" under your templates folder, please backup your templates, before installing a newer version of mgmedia2.

Changelog: (up)

License: (up)

mgmediabot is released under the GPL License, see http://www.gnu.org/copyleft/gpl.html

Credits: (up)

Thanks to Jeroen Wijering for his fine Flash Mediaplayer, visit http://www.jeroenwijering.com/. You should know that Flash Mediaplayer is not free for commercial use.
Thanks to Cody Lindley for his ThickBox implementation, visit http://jquery.com/demo/thickbox/.

Contact & Support: (up)

Look at http://www.needful.de/mgmediabot-demo for newer versions of mgmediabot, if you need support go to the support forum at http://www.needful.de/mgmediabot-demo or write a mail to mgmediabot@needful.de.